#include"func.h"
int main(int argc,char* argv[]){
    // /2_pipe_write 1.pipe
    ARGS_CHECK(argc,2);
    //打开管道文件,返回描述符
    int fd = open(argv[1],O_WRONLY);
    //读取文件
    //char buf[1024] = {0};
    //ssize_t rs = read(fd,buf,sizeof(buf));
    //写入数据
    ssize_t res = write(fd,"hello",5);
    ERROR_CHECK(res,-1,"write");
    puts("I am writing :hello");

    return 0;
}
